﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example51_CSharp_125_
{
   public class SapXep
    {
       public void SapXepTang(float []a,int n)
       {
           for(int i=0;i<n;i++)
           {
               for(int j=0;j<n;j++)
               {
                   if (a[i] < a[j])
                   {
                       float t = a[i];
                       a[i] = a[j];
                       a[j] = t;
                   }
               }
           }
       }
       public void SapXepGiam(float[] a, int n)
       {
           for (int i = 0; i < n; i++)
           {
               for (int j = 0; j < n; j++)
               {
                   if (a[i] > a[j])
                   {
                       float t = a[i];
                       a[i] = a[j];
                       a[j] = t;
                   }
               }
           }
       }
       public void Print(float[] a, int n)
       {
           for (int i = 0; i < n; i++)
           {
               Console.WriteLine(a[i]);
           }
       }
    }
}
